package com.zengqingfa.designpattern.structure.proxy.cglib;

/**
 *
 * @fileName: Client
 * @author: zengqf3
 * @date: 2021-4-22 9:00
 * @description:
 */
public class Client {

    public static void main(String[] args) {
        CGLibProxy cgLibProxy = new CGLibProxy();
        RealSubject proxyObject = (RealSubject) cgLibProxy.createProxyObject(new RealSubject());
        //代理类的类型：class com.zengqingfa.designpattern.structure.proxy.cglib.RealSubject$$EnhancerByCGLIB$$1ad83320
        System.out.println("代理类的类型：" + proxyObject.getClass());
        proxyObject.method();
    }
}
